
import request from '@/utils/request'
// 登录的接口
const loginAPI = (data) => {
  return request({
    url: '/sys/login',
    method: 'post',
    data: data
  })
}
/**
 * 用户 - 获取用户资料
 * @description: 获取用户资料
 * @param {*}
 * @return {*}
 */
const getUserProfileAPI = () => {
  return request({
    url: '/sys/profile',
    method: 'post'
  })
}
/**
 * 用户 - 获取头像
 * @description: 获取用户头像
 * @param {*} id 用户id
 * @return {*}
 */
const getUserPhotoAPI = (id) => {
  return request({
    url: `/sys/user/${id}`
  })
}
/**
 * @description: 获取员工详细信息
 * @param {*} id 用户id
 * @return {*}
 */
const getUserDetailByIdAPI = (id) => {
  return request({
    url: `/sys/user/${id}`
  })
}
export {
  loginAPI,
  getUserProfileAPI,
  getUserPhotoAPI,
  getUserDetailByIdAPI
}
